{% extends 'base.html' %}

{% block content %}
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
    <div class="carousel-indicators">
        {% for p in photos %}
            <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{ forloop.counter0 }}" class="{% if forloop.counter0 == 0 %} active {% endif %}"
                    aria-current="true" aria-label="Slide {{ forloop.counter0 }}"></button>
        {% endfor %}
    </div>
    <div class="carousel-inner">
        {% for p in photos %}
            <div class="carousel-item {% if forloop.counter0 == 0 %} active {% endif %}">
                <img src="{{ p.image.url }}" class="d-block w-100" alt="Slide {{ forloop.counter0 }}">
            </div>
        {% endfor %}
    </div>
    <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators"  data-bs-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Previous</span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators"  data-bs-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Next</span>
    </button>
</div>
{% endblock %}
